Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Renaming a directory containing Papyrus models
Renaming a directory containing Papyrus models [message #1512127] Mon, 15 December 2014 13:27 Go to next message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi,

I have directory containing several Papyrus models.

If I rename this directory, the Papyrus diagram files (*.di) lose their associations to the corresponding *.uml files and can no longer be opened. This happens even if I use the Eclipse Refactor/Rename.. menu.

Is there a way to rename the directory without losing my diagrams? The only solution I can think of is saving the diagrams one by one in the new location, but this would be rather time consuming.

Cheers,
Vlad

Re: Renaming a directory containing Papyrus models [message #1519360 is a reply to message #1512127] Sat, 20 December 2014 16:21 Go to previous messageGo to next message
Anders Sjöström is currently offline Anders SjöströmFriend
Messages: 4
Registered: December 2014
Junior Member
Hi,

Sounds intriguing! I did a quick test (Using Papyrus 1.0/Luna) and had no problems at all after a folder rename. I created a project, with a folder, created two Papyrus models and added some diagrams. Then I renamed the folder in various ways, all of them successful.

Can you give some more specifics on what you are doing?

Could it be that your .notation-file for some reason contains an absolute path to the .uml file?
Re: Renaming a directory containing Papyrus models [message #1519794 is a reply to message #1519360] Sat, 20 December 2014 22:10 Go to previous messageGo to next message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi,

Thanks for taking the time to replicate my problem.

I'm also using Papyrus 1.0 and Eclipse Luna. Here are the steps I am following:

- I have the attached .uml, .notation, and .di files in a directory called "models".
- Using Eclipse, I right-click on the "models" directory in the Package Explorer and select the Refactor->Rename menu option. I type a new directory name.
- When I double-click on the ad1.di file in the Package Explorer, the Papyrus diagram editor opens, but the content of the diagram is blank.

The same problem appears if I rename the directory using Windows.

I checked the .notation file, but it doesn't seem to contain any absolute paths. So the problem is quite strange indeed.

Cheers,
Vlad

  • Attachment: ad1.uml
    (Size: 1.54KB, Downloaded 59 times)
  • Attachment: ad1.notation
    (Size: 6.84KB, Downloaded 72 times)
  • Attachment: ad1.di
    (Size: 0.10KB, Downloaded 125 times)
Re: Renaming a directory containing Papyrus models [message #1521128 is a reply to message #1519794] Sun, 21 December 2014 16:20 Go to previous messageGo to next message
Anders Sjöström is currently offline Anders SjöströmFriend
Messages: 4
Registered: December 2014
Junior Member
Hi,

I think I'm starting to understand your problem.

If I do exactly the steps you describe I also get the result that the diagram editor is opened, and is blank. However I don't think that it is due to some corruption or lost association.

Papyrus will in the workspace meta data save which diagrams that were open last time the diagram editor was open. Since a model can contain many diagrams, you would not like all of them to always open automatically each time you open the model, instead it will only restore those that were open last time. Your model is sort of a special case, since it has only one diagram one could argue that the tool could detect that and simply open that lonely diagram by default Smile

The file the state is saved to contains workspace relative paths, thus the diagram is no longer found if the name of the folder is changed. Same thing happens if you copy the files to another project, and then open the model from that project. Papyrus will not have any memory of what diagram(s) should be restored.

Try this: From the state that you described, try opening the "Model Explorer", Expand "Activity Diagram Q1", Right click on "Diagram Activity" and do "open". Now you should hopefully be able to see the activity diagram, right?
Re: Renaming a directory containing Papyrus models [message #1522838 is a reply to message #1521128] Mon, 22 December 2014 15:19 Go to previous messageGo to next message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi Anders,

Thank you for the detailed description. This explains all the problems I was having when moving models around.

Your suggested solution works, I can open the diagram after re-naming its directory.

Cheers,
Vlad
Re: Renaming a directory containing Papyrus models [message #1526088 is a reply to message #1522838] Wed, 24 December 2014 10:53 Go to previous messageGo to next message
Anders Sjöström is currently offline Anders SjöströmFriend
Messages: 4
Registered: December 2014
Junior Member
Excellent! Have you discovered the Papyrus perspective? I have found that it helps a lot, since the relevant views are opened at once the modelling gets a lot less confusing...

Cheers and merry Christmas!
/Anders
Re: Renaming a directory containing Papyrus models [message #1527886 is a reply to message #1526088] Thu, 25 December 2014 11:31 Go to previous message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Thanks for the tip. Yes, I'm also using the Papyrus perspective. It took me some time to discover it, and I was really missing the functionality of the Model Explorer before I did.

Merry Christmas!
Vlad
Previous Topic:Question related to the usage of Papyrus by researchers
Next Topic:Papyrus update site for Eclipse Indigo is out ?
Goto Forum:
  


Current Time: Thu Jul 09 21:53:16 GMT 2020

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

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

Back to the top