Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Reorder properties in class?
Reorder properties in class? [message #518009] Tue, 02 March 2010 13:36 Go to next message
Nick  is currently offline Nick
Messages: 18
Registered: March 2010
Junior Member
Maybe I'm missing something, but I can't find any way to change the order in which class properties appear in the diagram. Is there some keyboard shortcut I am overlooking, or is it really impossible to reorder the properties without deleting and recreating them in the desired order? TIA for any help.

-- Nick
Re: Reorder properties in class? [message #519582 is a reply to message #518009] Tue, 09 March 2010 06:29 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
...........

[Updated on: Wed, 10 March 2010 08:54]

Report message to a moderator

Re: Reorder properties in class? [message #519817 is a reply to message #518009] Tue, 09 March 2010 22:46 Go to previous messageGo to next message
Nick  is currently offline Nick
Messages: 18
Registered: March 2010
Junior Member
Vlad, thanks for your detailed reply.

I took a look at the Omondo web site and the product seems pretty solid, but I think it will be overkill for the project I'm working on...

I'm pretty happy with most of the functionality provided by the standard UML2 Tools editor, and I've been able to generate a lot of useful code from the XMI just by using XSL. As long as I can generate code from the model, I have 99% of what I need already, so I'm not sure it's worth it to add a large tool like Omondo just for this small bit of functionality.

The ability to reorder properties really feels like it should be a core feature... if someone can point me in the right general direction I'm willing to take a shot at adding the feature; it seems like it shouldn't be too difficult to implement.

I have zero experience hacking Eclipse so if someone can point me toward some information on adding a context menu entry and a keyboard shortcut that would be very helpful. There are some other things I'd like to see keyboard shortcuts for as well (creating a new property or method come to mind); I'll probably add those too while I'm at it, maybe there's a chance the patch will make it in. Wink
Re: Reorder properties in class? [message #519858 is a reply to message #519817] Wed, 10 March 2010 04:22 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
....



[Updated on: Wed, 10 March 2010 08:50]

Report message to a moderator

Re: Reorder properties in class? [message #519913 is a reply to message #519817] Wed, 10 March 2010 03:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25919
Registered: July 2009
Senior Member
Nick,

I remember there being discussions in GMF about whether the outline view
should be editable; you'd be able to use drag and drop to reorder
property in that case. Perhaps the common navigator framework's ability
to edit in the navigator is supported. If not, the very basic UML tree
editor does support reordering via drag and drop so maybe that will help
in a pinch.


Nick wrote:
> Vlad, thanks for your detailed reply.
> I took a look at the Omondo web site and the product seems pretty
> solid, but I think it will be overkill for the project I'm working on...
> I'm pretty happy with most of the functionality provided by the
> standard UML2 Tools editor, and I've been able to generate a lot of
> useful code from the XMI just by using XSL. As long as I can generate
> code from the model, I have 99% of what I need already, so I'm not
> sure it's worth it to add a large tool like Omondo just for this small
> bit of functionality.
>
> The ability to reorder properties really feels like it should be a
> core feature... if someone can point me in the right general direction
> I'm willing to take a shot at adding the feature; it seems like it
> shouldn't be too difficult to implement.
> I have zero experience hacking Eclipse so if someone can point me
> toward some information on adding a context menu entry and a keyboard
> shortcut that would be very helpful. There are some other things I'd
> like to see keyboard shortcuts for as well (creating a new property or
> method come to mind); I'll probably add those too while I'm at it,
> maybe there's a chance the patch will make it in. ;)
Re: Reorder properties in class? [message #519983 is a reply to message #519913] Wed, 10 March 2010 12:14 Go to previous messageGo to next message
Nick  is currently offline Nick
Messages: 18
Registered: March 2010
Junior Member
Quote:
Nick,

I remember there being discussions in GMF about whether the outline view should be editable; you'd be able to use drag and drop to reorder property in that case.


This didn't work for me in Galileo, I'll have to check out the dev version and see if it made it in... You can drag properties between classes but you can't move them around within one class.

Quote:
Perhaps the common navigator framework's ability
to edit in the navigator is supported. If not, the very basic UML tree editor does support reordering via drag and drop so maybe that will help in a pinch.


This is what I've been using, but the process isn't straightforward. It has a few problems...

- I can't drag an attribute next to one of its siblings, only inside of a sibling.

- If I drag an attribute onto its parent, it will duplicate itself, with the new attribute appearing at the bottom of the list (bug?).

I can reorder the attributes by moving them to another class and then moving them back. This will put them at the end of the list. This will not update the diagram, though, so then I need to delete the class from the diagram and resynchronize. The attributes will now appear where I want them...

Thanks for the help...
Re: Reorder properties in class? [message #625534 is a reply to message #519817] Wed, 10 March 2010 04:22 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Nick,

I fully agree that EclipseUML is very complex because when modeling because you also need to have a look at metamodel and java code and not only at UML design then transformation.

Just want to remind you that the time you save at the start of the project using simpleUML modeling tools will make it more difficult for the integration team. See my tutorial on the modeling life cycle at:
Modeling & development cycles - business rules (4m20s) : http://www.download-omondo.com/modeling_cycle_business_rules .swf / .http://www.download-omondo.com/modeling_cycle_business_rule s.exe / http://www.download-omondo.com/modeling_cycle_business_rules .hqx

Just imagine that you are the only modeler and there is a team of 10 architect, developers. It is more important that you spend twice more time on your modeling job than the 10 other members of your team. It is also more profitable for the company and the model would be a lot better specially for advanced code generation purposes.
Another reason of the complexity is the need for iteration between modelers and integration team code. At this iteration stage only a heavy weight java integration mix with metamodel can merge model, add existing code and come back to model for another iteration. If you just have graphical design then generate code this iteration is impossible !!
Re: Reorder properties in class? [message #625537 is a reply to message #519817] Wed, 10 March 2010 08:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25919
Registered: July 2009
Senior Member
Nick,

I remember there being discussions in GMF about whether the outline view
should be editable; you'd be able to use drag and drop to reorder
property in that case. Perhaps the common navigator framework's ability
to edit in the navigator is supported. If not, the very basic UML tree
editor does support reordering via drag and drop so maybe that will help
in a pinch.


Nick wrote:
> Vlad, thanks for your detailed reply.
> I took a look at the Omondo web site and the product seems pretty
> solid, but I think it will be overkill for the project I'm working on...
> I'm pretty happy with most of the functionality provided by the
> standard UML2 Tools editor, and I've been able to generate a lot of
> useful code from the XMI just by using XSL. As long as I can generate
> code from the model, I have 99% of what I need already, so I'm not
> sure it's worth it to add a large tool like Omondo just for this small
> bit of functionality.
>
> The ability to reorder properties really feels like it should be a
> core feature... if someone can point me in the right general direction
> I'm willing to take a shot at adding the feature; it seems like it
> shouldn't be too difficult to implement.
> I have zero experience hacking Eclipse so if someone can point me
> toward some information on adding a context menu entry and a keyboard
> shortcut that would be very helpful. There are some other things I'd
> like to see keyboard shortcuts for as well (creating a new property or
> method come to mind); I'll probably add those too while I'm at it,
> maybe there's a chance the patch will make it in. ;)
Re: Reorder properties in class? [message #625539 is a reply to message #625537] Wed, 10 March 2010 12:14 Go to previous message
Nick  is currently offline Nick
Messages: 18
Registered: March 2010
Junior Member
Quote:
> Nick,
>
> I remember there being discussions in GMF about whether the outline view should be editable; you'd be able to use drag and drop to reorder property in that case.


This didn't work for me in Galileo, I'll have to check out the dev version and see if it made it in... You can drag properties between classes but you can't move them around within one class.

Quote:
> Perhaps the common navigator framework's ability
> to edit in the navigator is supported. If not, the very basic UML tree editor does support reordering via drag and drop so maybe that will help in a pinch.


This is what I've been using, but the process isn't straightforward. It has a few problems...

- I can't drag an attribute next to one of its siblings, only inside of a sibling.

- If I drag an attribute onto its parent, it will duplicate itself, with the new attribute appearing at the bottom of the list (bug?).

I can reorder the attributes by moving them to another class and then moving them back. This will put them at the end of the list. This will not update the diagram, though, so then I need to delete the class from the diagram and resynchronize. The attributes will now appear where I want them...

Thanks for the help...
Previous Topic:Reorder properties in class?
Next Topic:reuse model files of UML2 Tools
Goto Forum:
  


Current Time: Fri Jul 25 19:16:25 EDT 2014

Powered by FUDForum. Page generated in 0.06904 seconds