Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Layering(Additional layer not getting activated by default)
Layering [message #1777444] Wed, 29 November 2017 12:33 Go to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Hi,

I have created an additional layer in the diagram and set it to be active by default and optional as well. It works when I create a new model. However, when I load the old model the additional layer is not getting activated by default.

How to solve this?

-Yash
Re: Layering [message #1777462 is a reply to message #1777444] Wed, 29 November 2017 14:06 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Yash,

This the good behavior. When you modify the layer and save the representation and close it, the representation keep the state.

Regards,
Re: Layering [message #1777465 is a reply to message #1777462] Wed, 29 November 2017 14:16 Go to previous messageGo to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Hi Julien,

Thank you for your reply.

Yes, I know that once I activate the layer manually, save the representation and close it, the state is maintained.

However, my requirement is to enable this layer by default (as it is set to be activated by default in odesign file) when loading the models that were created with previous version when this layer does not exist.

Some extra information :I have restructured the tools in the palette in the new version of odesign file. Some tools now appear in the additional layer that used to be in the default layer previously.

-Yash
Re: Layering [message #1777485 is a reply to message #1777465] Wed, 29 November 2017 15:58 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 162
Registered: July 2009
Senior Member
I don't understand why the layer is not active by default on an existing representation when you open it.
Could you give us a simple use case to reproduce?

Regards,
Re: Layering [message #1777695 is a reply to message #1777485] Fri, 01 December 2017 16:20 Go to previous messageGo to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Hi,

Here is the link of the project that reproduce the issue. Please have a look on the README.md file there for more understanding.
https://github.com/yashkhatri/sirius_layering_issue/tree/master

Thanks
-Yash
Re: Layering [message #1777767 is a reply to message #1777695] Mon, 04 December 2017 12:44 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 166
Registered: October 2014
Senior Member
Hello

Quote:
I have created an additional layer in the diagram and set it to be active by default and optional as well. It works when I create a new model. However, when I load the old model the additional layer is not getting activated by default.

Yes it is the normal behavior.

You will be forced either to activate it manually or add a migration participant to upgrade the aird resource when loading it.[1]
You can find multiple examples with org.eclipse.sirius.business.api.migration.AbstractRepresentationsFileMigrationParticipant sub-classes in the sirius git repository[2]
In your case, you just have to imlpement postLoad method to activate the layers.

regards
Laurent

[1] https://www.eclipse.org/sirius/doc/developer/extensions-provide_migrate_contribution.html
[2] https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

[Updated on: Mon, 04 December 2017 12:55]

Report message to a moderator

Previous Topic:Diagram in a Dialog
Next Topic:Issue with enum literals in aql conditions
Goto Forum:
  


Current Time: Sun Apr 05 07:16:36 GMT 2020

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

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

Back to the top