Home » Modeling » Papyrus » Possible Model Explorer bug
Possible Model Explorer bug [message #1398830] |
Fri, 11 July 2014 17:08 |
Stephen Blackwell Messages: 138 Registered: March 2014 |
Senior Member |
|
|
This looks like a bug to me. Can anyone else reprodice it? I took a quick look in bugzilla but I didn't see anything appropriate.
Summary:
When the C_Cpp profile is applied to a model, EcorePrimitiveTypes and PrimitiveTypes are displayed in the Model Explorer pane only after a model element has been deleted.
Steps to reproduce:
1. Create a new Papyrus UML project, with an initial Class diagram
a) File->New->Papyrus Project
b) Name project, check Use default location, click Next
c) Select UML, Click Next
d) Check UML Class Diagram, name diagram, click Finish
2) Apply the C/C++ profile
a) Select model in the Model Explorer
b) In the Properties window, select the Profile tab
c) Click on the "Apply regisered profile" button,
d) Select the C/C++ profile, click OK.
e) Check the C_Cpp box, click OK.
The C_Cpp profile shows up in the "Profile application" area but the Model Explorer pane is not changed. You can expand the model to show the diagram but nothing else is displayed.
3) Add a class to the model.
The Model Explorer shows the new class as a child of the model.
4) Delete the new class using the delete key.
The class is deleted and removed from the model as expected but now the model has 2 siblings in the Model Explorer window: PrimitiveTypes and EcorePrimitiveTypes, both greyed out but still selectable.
I would assume that these are supposed to be displayed when the profile is applied to the model.
What is the greying out indicating?
BTW, if a class is created and deleted before the profile is applyed to the model, the PrimitiveTypes are displayed in the ModelExplorer immediately.
|
|
| |
Re: Possible Model Explorer bug [message #1398889 is a reply to message #1398830] |
Fri, 11 July 2014 18:55 |
|
Hi, Stephen,
This sounds like the C_Cpp profile doesn't make much use of those
library models, such that they only appear when they are forced by
proxy resolution to load. And performing a delete command could
certainly do that, because delete wipes out all cross-references to the
deleted elements, which triggers the ECrossReferenceAdapter or does an
ad hoc cross-reference scan on the ResourceSet, either of which would
cause proxies (likely in the C_Cpp profile's package imports) to be
resolved.
So, not an unexpected behaviour of the Model Explorer, but I can see
why it would be surprising. It would be nice if all newly reachable
top-level packages showed right away in the explorer rather than
page-faulting in one by one, as it were. (it would also be nice not to
be prompted to select the only package/profile to import/apply in a
resource that only has the one)
The greying-out indicates that these library models are not editable
(they are read-only).
You might raise an enhancement request in bugzilla to ask that newly
reachable top packages all be shown immediately in the Model Explorer
when a package is imported or a profile applied. But, then, what
should happen the next time a model with the C_Cpp profile applied is
opened in the editor? Should the explorer immediately find and show
the libraries that the model's applied profiles (such as C_Cpp) import?
Perhaps. But it is not so clear in the case that a package isn't
explictly imported using a PackageImport relationship but is simply
referenced (because PackageImport alters the importing namespace, which
one doesn't always want). In that case, finding the used top-level
packages is a potentially expensive operation.
So, I don't know that this is an enhancement we would want to implement ...
HTH,
Christian
On 2014-07-11 17:08:48 +0000, Stephen Blackwell said:
> This looks like a bug to me. Can anyone else reprodice it? I took a
> quick look in bugzilla but I didn't see anything appropriate.
>
> Summary:
> When the C_Cpp profile is applied to a model, EcorePrimitiveTypes and
> PrimitiveTypes are displayed in the Model Explorer pane only after a
> model element has been deleted.
>
> Steps to reproduce:
>
> 1. Create a new Papyrus UML project, with an initial Class diagram
> a) File->New->Papyrus Project
> b) Name project, check Use default location, click Next
> c) Select UML, Click Next
> d) Check UML Class Diagram, name diagram, click Finish
>
> 2) Apply the C/C++ profile
> a) Select model in the Model Explorer
> b) In the Properties window, select the Profile tab
> c) Click on the "Apply regisered profile" button, d) Select the
> C/C++ profile, click OK.
> e) Check the C_Cpp box, click OK.
>
>
> The C_Cpp profile shows up in the "Profile application" area but the
> Model Explorer pane is not changed. You can expand the model to show
> the diagram but nothing else is displayed.
>
> 3) Add a class to the model.
> The Model Explorer shows the new class as a child of the model.
>
> 4) Delete the new class using the delete key.
> The class is deleted and removed from the model as expected but now the
> model has 2 siblings in the Model Explorer window: PrimitiveTypes and
> EcorePrimitiveTypes, both greyed out but still selectable.
> I would assume that these are supposed to be displayed when the profile
> is applied to the model.
> What is the greying out indicating?
>
> BTW, if a class is created and deleted before the profile is applyed to
> the model, the PrimitiveTypes are displayed in the ModelExplorer
> immediately.
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 15:52:42 GMT 2024
Powered by FUDForum. Page generated in 0.05227 seconds
|