Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Create model from existing uml not working in Luna/Papyrus 1.0.0
Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1407002] Mon, 11 August 2014 16:31 Go to next message
Bryce Nordgren is currently offline Bryce NordgrenFriend
Messages: 3
Registered: January 2012
Junior Member
Running Eclipse Luna / Papyrus 1.0.0 on Linux Mint 17 (Ubuntu 14.04).

I am trying to import the uml profile for RDF (version 1.1beta2 posted on the OMG website. I'd include a link, but this forum says: "You can only use links to eclipse.org sites while you have fewer than 5 messages."

Instructions seem to indicate that I would import the file into a project, navigate to it within the Model Explorer, then right click and initialize a papyrus diagram. (https://wiki.eclipse.org/Papyrus_User_Guide#Create_a_diagram_from_an_existing_uml_file).

Problem: The "Model Explorer" never shows the tree for existing uml files (created by Paprus or created externally). It shows "No model available", unless the diagram editor for the model is open and currently selected. The key is that the selected diagram editor controls what the Model Explorer displays, and since the uml file does not have a diagram yet, it can never be displayed. "Package explorer" does not have the option to initialize a papyrus diagram.

Possibly Related Problem: The "Model Explorer" never shows any tree for any uml files when the Modeling perspective is open. Switching to the Java perspective displays a tree in the Model Explorer.

Has the recommended method of importing externally defined UML models changed in the new version?

Re: Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1407172 is a reply to message #1407002] Tue, 12 August 2014 03:12 Go to previous messageGo to next message
Bryce Nordgren is currently offline Bryce NordgrenFriend
Messages: 3
Registered: January 2012
Junior Member
My "Possibly Related Problem" may be due to the fact that I was using the Modeling Perspective instead of the Papyrus perspective. I didn't notice the Papyrus option at first.

Found a post which suggests to navigate to the xml resource via the Package Explorer, right click, and create a new papyrus model. (https://www.eclipse.org/forums/index.php/mv/msg/149654/470453/#msg_470453) This creates a blank model 100% of the time on my test data (The Business Motivation Model v. 1.2, posted on the OMG.org site).

I did get the OMG XMI to import, sort of. My process was:



  1. Replace the base element <xmi:XMI/> with <uml:Model/> from a blank papyrus model.
  2. Delete the trailing <mofext:xyz/> tag which followed the package.
  3. Change the <uml:Package/> item to <packagedElement type="uml:Package"/> ...
  4. Change four upper bounds from 0 to 1.
  5. Change a <type href="OMG URL reference to type"/> to href="platform://blahblah" when referring to a String.


After that, I can do a package import and use the OMG-defined model from my own models. However, I am noticing that the import was imperfect. Whatever wrote the OMG file appears to represent a multiplicity of "*" by omitting the lower bound and specifying an upper bound of "*". Papyrus/eclipse interprets this as "1..*".

I can fix it with the UML editor (the property editor looking thing), but I have yet to be able to create a diagram which directly edits this model.

[Updated on: Tue, 12 August 2014 14:31]

Report message to a moderator

Re: Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1409506 is a reply to message #1407172] Mon, 18 August 2014 09:27 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 682
Registered: February 2011
Senior Member
Hi Bryce,

The wiki is outdated. To create a new Papyrus mdoel from an existing *.uml model:

- Select the *.uml file
- Go to File > New > Papyrus Model

Eclipse/UML2 and Papyrus should support the various OMG/XMI namespaces. However, Papyrus expects the *.uml file extension. So, replacing *.xmi with *.uml should be sufficient in most cases.

Depending on the models, there might be some additional refactorings required; e.g. I'm not sure how references to UML Primitive Types are handled (It seems you had issues with them)

Regards,
Camille


Camille Letavernier
Papyrus developer
Re: Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1588166 is a reply to message #1407002] Tue, 27 January 2015 19:50 Go to previous messageGo to next message
David Wille is currently offline David WilleFriend
Messages: 1
Registered: January 2015
Junior Member
I'm sorry for bringing up this old post, but I'm currently facing more or less the same problems.
I'm trying to import an *.uml file into Papyrus, which I created using the "org.eclipse.uml2.uml" classes, but using the described workflow:

1. Navigate to *.uml file in Package Explorer
2. Right click
3. New > Other... > Papyrus Model

results in an empty editor for the *.di file. The Model Explorer View shows the contents of the *.uml file, but I have no idea how to convince Papyrus to display them in the editor.
Even if I create an *.uml file with Papyrus instead of using the "org.eclipse.uml2.uml" classes, I face the same problems when reimporting the file *.uml file with the described workflow. I'm not quite sure whether I'm missing something, but I would appreciate any hints on this topic.

Thanks in advance and kind regards
David
Re: Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1589634 is a reply to message #1588166] Wed, 28 January 2015 15:07 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 987
Registered: July 2009
Senior Member
Hi, David,

Papyrus does not automatically create diagrams to visualize the
contents of your model.

You need to create diagrams (context-menu actions in the Model Explorer
and also available in the toolbar) and drag elements from the Model
Explorer into those diagrams to populate them.

HTH,

Christian


On 2015-01-28 15:00:18 +0000, David Wille said:

> I'm sorry for bringing up this old post, but I'm currently facing more
> or less the same problems.
> I'm trying to import an *.uml file into Papyrus, which I created using
> the "org.eclipse.uml2.uml" classes, but using the described workflow:
>
> 1. Navigate to *.uml file in Package Explorer
> 2. Right click
> 3. New > Other... > Papyrus Model
>
> results in an empty editor for the *.di file. The Model Explorer View
> shows the contents of the *.uml file, but I have no idea how to
> convince Papyrus to display them in the editor.
> Even if I create an *.uml file with Papyrus instead of using the
> "org.eclipse.uml2.uml" classes, I face the same problems when
> reimporting the file *.uml file with the described workflow. I'm not
> quite sure whether I'm missing something, but I would appreciate any
> hints on this topic.
>
> Thanks in advance and kind regards
> David
Re: Create model from existing uml not working in Luna/Papyrus 1.0.0 [message #1687936 is a reply to message #1589634] Fri, 20 March 2015 00:24 Go to previous message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 54
Registered: March 2012
Location: North Carolina
Member
I found this thread and though great now I know why the *.di is empty. But for me when I open the Papyrus Perspective the Model Explorer is empty, no matter what I give focus to in the Project Explorer or inside a *.uml file. I checked Preferences and restore them to default but still nothing. What am I missing? I am on Juno 4.4.1 and Papyrus 1.0.2.201502181349

[Updated on: Fri, 20 March 2015 00:24]

Report message to a moderator

Previous Topic:Oomph setup --> lots of compiler issues
Next Topic:Explanation of the Activity Diagram Loop Node
Goto Forum:
  


Current Time: Fri Jul 31 07:24:39 GMT 2015

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

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