Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Problem loading UML file in Papyrus(I generate a UML file with a java program, and I want to load the class diagram)
Problem loading UML file in Papyrus [message #1017254] Mon, 11 March 2013 10:34 Go to next message
Federico Toledo is currently offline Federico Toledo
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
Hi,

I am trying to load a uml model that I've generated with a java program. I created it with the UML sdk compilant to uml 2.4. I can see the model with the UML editor (in a tree format) and it validates correctly.
I am using a UML Profile, applying stereotypes to my classes.

To try to find the problem, I've found a reduced set of steps to reproduce my problem.

Create with Papyrus a UML file, with only one class, importing the profile, applying on stereotype to the class.
Delete the .di and .notation. So, here we are in my "initial situation", but with a file that we generated with Papyrus just to be sure that it is not a problem with the way that I am generating the uml file.

Now, follow the steps to create a diagram from a uml file:
- select the uml file
- menu file, new, papyrus diagram

I get an exception like the one in the file attached



Am I doing something wrong?
Thank you in advance for any help
  • Attachment: error.png
    (Size: 30.25KB, Downloaded 81 times)
Re: Problem loading UML file in Papyrus [message #1017298 is a reply to message #1017254] Mon, 11 March 2013 14:23 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 802
Registered: July 2009
Senior Member
Hi, Federico,

Which build of Papyrus are you using? There was an interval during
development of CDO integration on the cdo_kepler branch in which I had
broken the creation of new models, such that the ModelSet would attempt
to load the notation resource created by the wizard before it was
filled with its initial content. But that was fixed before the branch
was merged to trunk.

Can you provide the exception stack trace(s) from the workspace log
file to help diagnose? Depending on the release or build that you are
using, this should probably be reported in bugzilla: it looks like a
bug.

(I don't think you are doing anything wrong)

One thing to try: do you get the same result if you select your *.uml
file in the Project Explorer and launch the New Papyrus Model wizard?
It will open in a mode that creates a new model from the existing
domain (UML) model file.

Thanks,

Christian


On 2013-03-11 10:34:52 +0000, Federico Toledo said:

> Hi,
>
> I am trying to load a uml model that I've generated with a java
> program. I created it with the UML sdk compilant to uml 2.4. I can see
> the model with the UML editor (in a tree format) and it validates
> correctly.
> I am using a UML Profile, applying stereotypes to my classes.
>
> To try to find the problem, I've found a reduced set of steps to
> reproduce my problem.
>
> Create with Papyrus a UML file, with only one class, importing the
> profile, applying on stereotype to the class.
> Delete the .di and .notation. So, here we are in my "initial
> situation", but with a file that we generated with Papyrus just to be
> sure that it is not a problem with the way that I am generating the uml
> file.
>
> Now, follow the steps to create a diagram from a uml file:
> - select the uml file
> - menu file, new, papyrus diagram
>
> I get an exception like the one in the file attached
>
>
>
> Am I doing something wrong?
> Thank you in advance for any help
> <image>
Re: Problem loading UML file in Papyrus [message #1017314 is a reply to message #1017298] Mon, 11 March 2013 15:03 Go to previous messageGo to next message
Federico Toledo is currently offline Federico Toledo
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
Hi,thank you for your answer!

I've just updated Papyrus, and now I could advance a new step in this. Thank you.
Now I have the version is 0.9.2.v201302131112.

Now I have a different problem/question.


If I try to load a Class Diagram, I can, with the wizzard, selecting first the uml file, and then adding manually all elements I need in the diagram.
Now I've also tried with an activity diagram and with a sequence diagrams. The question is if there is any way to initialize the diagram, because if I create a sequence diagram I have to add all the elements of my sequence diagram... and I am not sure if I modify things in the diagram then they will be impacted in the uml model (in the original one) .. that actually is what I really want: build a model with a java program, let the user to modify it with a graphical tool, and then use the uml model as input in ATL transformations.

Thank you so much for your time!

Re: Problem loading UML file in Papyrus [message #1017735 is a reply to message #1017314] Tue, 12 March 2013 13:09 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 802
Registered: July 2009
Senior Member
Hi, Federico,

I think that the behaviour diagrams in Papyrus are not "canonical" as
they are in some other Eclipse-based UML modeling tools. You can build
the diagram in code, but after that, any modifications made by the user
will be reflected in the UML model, so that should not be an issue.

Cheers,

Christian


On 2013-03-11 15:03:09 +0000, Federico Toledo said:

> Hi,thank you for your answer!
>
> I've just updated Papyrus, and now I could advance a new step in this.
> Thank you.
> Now I have the version is 0.9.2.v201302131112.
>
> Now I have a different problem/question.
>
>
> If I try to load a Class Diagram, I can, with the wizzard, selecting
> first the uml file, and then adding manually all elements I need in the
> diagram. Now I've also tried with an activity diagram and with a
> sequence diagrams. The question is if there is any way to initialize
> the diagram, because if I create a sequence diagram I have to add all
> the elements of my sequence diagram... and I am not sure if I modify
> things in the diagram then they will be impacted in the uml model (in
> the original one) .. that actually is what I really want: build a model
> with a java program, let the user to modify it with a graphical tool,
> and then use the uml model as input in ATL transformations.
>
> Thank you so much for your time!
Re: Problem loading UML file in Papyrus [message #1017738 is a reply to message #1017735] Tue, 12 March 2013 13:14 Go to previous messageGo to next message
Federico Toledo is currently offline Federico Toledo
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
yes! I started to check that. Something kind of confusing is that if you use "delete" key you just hide the element, so, you delet it from the diagram. But all the changes I've tried they got reflected in the uml file.

Thank you!


Another question, is there a metamodel (perhaps even there are examples) as to use ATL to generate the .di file (and .notation) from the .uml file?
Re: Problem loading UML file in Papyrus [message #1017739 is a reply to message #1017738] Tue, 12 March 2013 13:15 Go to previous messageGo to next message
Federico Toledo is currently offline Federico Toledo
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
otherwise, is there any API to generate .di from java code?
Re: Problem loading UML file in Papyrus [message #1017813 is a reply to message #1017739] Tue, 12 March 2013 15:30 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 802
Registered: July 2009
Senior Member
Hi, Federico,

The *.di file contains an EMF-based model, like everything else. The
model is defined by the DiPackage:

svn+ssh://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.papyrus/trunk/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/model/di.ecore


So, it is manipulated by Java code or ATL transformations just as any
other EMF-based model.

cW


On 2013-03-12 13:15:15 +0000, Federico Toledo said:

> otherwise, is there any API to generate .di from java code?
Re: Problem loading UML file in Papyrus [message #1019191 is a reply to message #1017813] Fri, 15 March 2013 08:03 Go to previous message
Andreas Brieg is currently offline Andreas Brieg
Messages: 48
Registered: November 2012
Member
The problem you are seeing, Federico, is described in bug 317156. I'm working already on that and have proposed a first patch. Maybe you want to try. But the problem is when the patch is applied I don't see an initialized diagram. I need to do this manually.
Previous Topic:Sequence Diagram, messages as ordered set
Next Topic:Problem creating new Papyrus project within Eclipse
Goto Forum:
  


Current Time: Sat Oct 25 06:24:12 GMT 2014

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

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