Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Class Diagram Usability
Class Diagram Usability [message #474932] Thu, 24 July 2008 15:19 Go to next message
Juan Cadavid is currently offline Juan CadavidFriend
Messages: 59
Registered: July 2009
Location: Paris, France
Member

Hello UML2Tools team,

We're building a plug-in reusing your org.eclipse.uml2.diagram.clazz
component. We think it's pretty good, however we have some questions that
concern to its usability:

1. An average user creates a diagram with a few classes, and each one with
several properties. When he wants to specify the data type for each
property, he looks at the property view, goes to the Type entry, and then
is introduced to a gigantic combo box which shows all possible
metaclasses, eDataTypes, stereotypes, associations in the UML2 metamodel,
etc., and he just wants to declare a String or an integer. We'd like to
make things simpler by showing him only the primitive data types. Is there
anyway we can filter out this big list?

2. We're also working with profiles and stereotypes, and it turns out
incredibly cool that right-clicking an element shows us the "Apply
Stereotype" menu with all the appliable stereotypes for that element.
However, currently the diagram only shows the stereotypes for classes, but
not for properties or associations. Is there a reason why this isn't so?
Any possible way to fix it?

3. Also, when we apply an stereotype that has properties (aka "tagged
values"), these are not displayed in the properties window when the
stereotyped element is selected; this does show up in the UML2 tree
editor, but not in UML2Tools, so the user has to switch editors to edit
the properties of a stereotype application (from the .umlclass to .uml
file). Is there any way we can save this effort to the users?

Thanks a lot, keep doing a great job!

-Juan
Re: Class Diagram Usability [message #474935 is a reply to message #474932] Fri, 25 July 2008 18:52 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hi Juan,

> We're building a plug-in reusing your org.eclipse.uml2.diagram.clazz
> component. We think it's pretty good, however we have some questions
> that concern to its usability:

Thank you for (re)using our product. I hope, you'll like it.

> 1. An average user creates a diagram with a few classes, and each one
> with several properties. When he wants to specify the data type for
> each property, he looks at the property view, goes to the Type entry,
> and then is introduced to a gigantic combo box which shows all
> possible metaclasses, eDataTypes, stereotypes, associations in the
> UML2 metamodel, etc., and he just wants to declare a String or an
> integer. We'd like to make things simpler by showing him only the
> primitive data types. Is there anyway we can filter out this big list?

a) The list is so huge because it shows Classes, DataTypes, etc not only
from the owning package, but also from all other loaded packages. UMLPrimitiveTypes
are imported by default, and therefore UMLPrimitiveTypes library is loaded.
You can remove the imports (expand secondary diagram node in the top-left
of the diagram, select all element imports, delete them), close diagram and
open it again. The type list will be significantly shorter.
b) In addition, UML2Tools provides TreeEditor to edit reference-based features
(type is a references-based one). TreeEditor is available by clicking '...'
button in the property sheet field.

c) If you are firm of purpose to leave only DataTypes, the following changes
will help you :
Take a look at org.eclipse.uml2.diagram.common.sheet.PropertySourceExtensio n
class. You'll need to change newPropertyDescriptor() method approximately
this way:
protected IPropertyDescriptor newPropertyDescriptor(IItemPropertyDescriptor
itemPropertyDescriptor) {
return new EMFCompositeSourcePropertyDescriptor(object, itemPropertyDescriptor,
getCategory()) {
protected CellEditor doCreateEditor(Composite composite) {
// copy default implementation
/changes appears here:
} else if (genericFeature instanceof EStructuralFeature) {
final EStructuralFeature feature = (EStructuralFeature) genericFeature;
// Here we set the type of elements that will be shown
final EClassifier eType;
if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) )
{
eType = UMLPackage.eINSTANCE.getDataType();
} else {
eType = feature.getEType();
}
// .. copy the code again or call super method

};
}
This is just a sketch, I hope it explained the idea of the changes.

> 2. We're also working with profiles and stereotypes, and it turns out
> incredibly cool that right-clicking an element shows us the "Apply
> Stereotype" menu with all the appliable stereotypes for that element.
> However, currently the diagram only shows the stereotypes for classes,
> but not for properties or associations. Is there a reason why this
> isn't so? Any possible way to fix it?
You are correct, there is a bugzilla request #218191 '[ClassD] Missing stereotype
display' . It's still open.
There are no technical difficulties to repeat the functionality, that have
already been implemented for classes:
1) In classDiagram.gmfmap file add label for stereotype (you can take label
from Class mapping as a template) to all DataType, PrimitiveType and other
needed mappings
2) In UMLParserProvider#create...Parser() replace default parser with AppliedStereotypeParser.


> 3. Also, when we apply an stereotype that has properties (aka "tagged
> values"), these are not displayed in the properties window when the
> stereotyped element is selected; this does show up in the UML2 tree
> editor, but not in UML2Tools, so the user has to switch editors to
> edit the properties of a stereotype application (from the .umlclass to
> .uml file). Is there any way we can save this effort to the users?

Tagged values have sophisticated presentation rules, that's why they are
not implemented now. If you impement the feature, that would be great!

> Thanks a lot, keep doing a great job!
Thanks the feedback!

Best wishes,
Tatiana.
Re: Class Diagram Usability [message #475297 is a reply to message #474935] Thu, 21 August 2008 16:28 Go to previous message
Juan Cadavid is currently offline Juan CadavidFriend
Messages: 59
Registered: July 2009
Location: Paris, France
Member

Hi Tatiana,

Thank you so much for your help! We're evaluating the effort required to
implement these features. If we do, we'd love to submit it as
contributions to the project :)

-Juan
Re: Class Diagram Usability [message #621746 is a reply to message #474932] Fri, 25 July 2008 18:52 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hi Juan,

> We're building a plug-in reusing your org.eclipse.uml2.diagram.clazz
> component. We think it's pretty good, however we have some questions
> that concern to its usability:

Thank you for (re)using our product. I hope, you'll like it.

> 1. An average user creates a diagram with a few classes, and each one
> with several properties. When he wants to specify the data type for
> each property, he looks at the property view, goes to the Type entry,
> and then is introduced to a gigantic combo box which shows all
> possible metaclasses, eDataTypes, stereotypes, associations in the
> UML2 metamodel, etc., and he just wants to declare a String or an
> integer. We'd like to make things simpler by showing him only the
> primitive data types. Is there anyway we can filter out this big list?

a) The list is so huge because it shows Classes, DataTypes, etc not only
from the owning package, but also from all other loaded packages. UMLPrimitiveTypes
are imported by default, and therefore UMLPrimitiveTypes library is loaded.
You can remove the imports (expand secondary diagram node in the top-left
of the diagram, select all element imports, delete them), close diagram and
open it again. The type list will be significantly shorter.
b) In addition, UML2Tools provides TreeEditor to edit reference-based features
(type is a references-based one). TreeEditor is available by clicking '...'
button in the property sheet field.

c) If you are firm of purpose to leave only DataTypes, the following changes
will help you :
Take a look at org.eclipse.uml2.diagram.common.sheet.PropertySourceExtensio n
class. You'll need to change newPropertyDescriptor() method approximately
this way:
protected IPropertyDescriptor newPropertyDescriptor(IItemPropertyDescriptor
itemPropertyDescriptor) {
return new EMFCompositeSourcePropertyDescriptor(object, itemPropertyDescriptor,
getCategory()) {
protected CellEditor doCreateEditor(Composite composite) {
// copy default implementation
/changes appears here:
} else if (genericFeature instanceof EStructuralFeature) {
final EStructuralFeature feature = (EStructuralFeature) genericFeature;
// Here we set the type of elements that will be shown
final EClassifier eType;
if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) )
{
eType = UMLPackage.eINSTANCE.getDataType();
} else {
eType = feature.getEType();
}
// .. copy the code again or call super method

};
}
This is just a sketch, I hope it explained the idea of the changes.

> 2. We're also working with profiles and stereotypes, and it turns out
> incredibly cool that right-clicking an element shows us the "Apply
> Stereotype" menu with all the appliable stereotypes for that element.
> However, currently the diagram only shows the stereotypes for classes,
> but not for properties or associations. Is there a reason why this
> isn't so? Any possible way to fix it?
You are correct, there is a bugzilla request #218191 '[ClassD] Missing stereotype
display' . It's still open.
There are no technical difficulties to repeat the functionality, that have
already been implemented for classes:
1) In classDiagram.gmfmap file add label for stereotype (you can take label
from Class mapping as a template) to all DataType, PrimitiveType and other
needed mappings
2) In UMLParserProvider#create...Parser() replace default parser with AppliedStereotypeParser.


> 3. Also, when we apply an stereotype that has properties (aka "tagged
> values"), these are not displayed in the properties window when the
> stereotyped element is selected; this does show up in the UML2 tree
> editor, but not in UML2Tools, so the user has to switch editors to
> edit the properties of a stereotype application (from the .umlclass to
> .uml file). Is there any way we can save this effort to the users?

Tagged values have sophisticated presentation rules, that's why they are
not implemented now. If you impement the feature, that would be great!

> Thanks a lot, keep doing a great job!
Thanks the feedback!

Best wishes,
Tatiana.
Re: Class Diagram Usability [message #622609 is a reply to message #474935] Thu, 21 August 2008 16:28 Go to previous message
Juan Cadavid is currently offline Juan CadavidFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Tatiana,

Thank you so much for your help! We're evaluating the effort required to
implement these features. If we do, we'd love to submit it as
contributions to the project :)

-Juan
Previous Topic:Re: Is it possible to create a Sequence Diagram with UML2Tool?
Next Topic:Creating State Charts
Goto Forum:
  


Current Time: Fri Apr 26 19:35:42 GMT 2024

Powered by FUDForum. Page generated in 0.02923 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top