Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Class Diagram cannot survive import(Creating an Eclipse Project with a Papyrus Class Diagram in one Eclipse Workspace and importing it into another breaks Class Diagrams)
Class Diagram cannot survive import [message #1715645] Wed, 25 November 2015 01:30 Go to next message
Jeffrey Cahoon is currently offline Jeffrey CahoonFriend
Messages: 2
Registered: November 2015
Junior Member
I created a new Papyrus project with a single class and a Class diagram showing that class. The project was outside the default location in the workspace, just in my home directory.

I then saved and closed eclipse.

I opened eclipse and set the workspace to a different workspace than the one where the project was created.

I imported the Papyrus project and the diagram is not there.

I was using Eclipse with Modeling Tools 4.5.1 and Papyrus 1.1.2.

I think this means that if your computer dies, you will always lose your diagrams, even if you save your projects to some repository.

Also, you won't be able to share diagrams with other developers on other machines. I don't know of any way to share my Eclipse workspace with other developers.

The model remains intact, but the class diagram is gone. This is weird since the *.di file and the *.notation file still exist. They just don't work.

Thanks,
Jeff
Re: Class Diagram cannot survive import [message #1715744 is a reply to message #1715645] Wed, 25 November 2015 16:01 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 935
Registered: February 2011
Senior Member
Hi Jeff,

The only thing that is tied to the workspace is the information about which diagrams are currently opened (i.e. the layout of the editor). When this information is lost (e.g. Switching workspaces), then the editor becomes empty by default. However, you should be able to simply re-open these diagrams by browsing your Model Explorer

There is a current task for Papyrus/Neon to improve the default contents when opening an "empty" editor, to avoid the confusion:

469188: [Editor] Page management improvements in the Papyrus multi-editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469188

Is this the issue you encounter, or is this something different?

HTH,
Camille


Camille Letavernier
Re: Class Diagram cannot survive import [message #1715766 is a reply to message #1715744] Wed, 25 November 2015 20:12 Go to previous messageGo to next message
Jeffrey Cahoon is currently offline Jeffrey CahoonFriend
Messages: 2
Registered: November 2015
Junior Member
You were right.

If I double click on the class diagram from inside the Model Explorer, the class diagram comes up correctly.

I had only tried to double click on the Papyrus model from the Project Explorer and it does not come up correctly, until I have brought it up from the Model Explorer.

After I have double clicked on the Class Diagram from the Model Explorer, then I can double click on the Papyrus model in the Project Explorer and it works.

I hadn't tried looking in the Model Explorer because I didn't know that the diagram itself became part of the model. I am actually still surprised. The model containing a representation of itself seems a little twisted.

No matter. I am happy now that I have a work around.

Thanks,
Jeff
Re: Class Diagram cannot survive import [message #1715826 is a reply to message #1715766] Thu, 26 November 2015 13:11 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1235
Registered: July 2009
Location: Canada
Senior Member

Hi, Jeff,

The Model Explorer is presenting a convenient fiction: the UML model
content does not reference or otherwise "contain" the diagrams. It is
only the diagrams that sit off to the side in the *.notation resource
that reference the contents of the *.uml resource. The Model Explorer
weaves the diagrams into the tree presentation under the elements that
they reference as their contexts.

It is also worth noting that the Model Explorer view's toolbar has a
toggle switch that changes the presentation to just a flat list of all
the diagrams "in" the model, which makes it easier to discover what is
available to open in the editor.

Cheers,

Christian

On 2015-11-25 20:12:54 +0000, Jeffrey Cahoon said:

> You were right.
>
> If I double click on the class diagram from inside the Model Explorer,
> the class diagram comes up correctly.
> I had only tried to double click on the Papyrus model from the Project
> Explorer and it does not come up correctly, until I have brought it up
> from the Model Explorer.
> After I have double clicked on the Class Diagram from the Model
> Explorer, then I can double click on the Papyrus model in the Project
> Explorer and it works.
>
> I hadn't tried looking in the Model Explorer because I didn't know that
> the diagram itself became part of the model. I am actually still
> surprised. The model containing a representation of itself seems a
> little twisted.
>
> No matter. I am happy now that I have a work around.
>
> Thanks,
> Jeff
Previous Topic:Error: Model content will not be shown
Next Topic:Cannot delete entity from diagram only
Goto Forum:
  


Current Time: Thu Jan 21 09:27:50 GMT 2021

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

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

Back to the top