Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Help requested on CSS(Current help is good but does not cover sufficient scope...)
Help requested on CSS [message #1436224] Thu, 02 October 2014 15:26 Go to next message
Philip Spiby is currently offline Philip SpibyFriend
Messages: 7
Registered: October 2014
Junior Member
I would like to ensure all SysML models produced on a collaborative project follow the same diagraming style. Therefore I was planning on using the Papyrus CSS approach (as an alternative to detailed description of the format and filters to be used). This seems to work fine with the initial step of presenting the Blocks on Block Definition Diagrams with the Parts, References and Values compartments being visible. However I cannot seem to write a rule that causes all public properties of the Block to be displayed in their respective compartments.

I have tried:
Property {
visible: true;
}

Class > Property {
visible: true;
}

Class > Compartment > Property {
visible: true;
}

but none of these seem to have the desired effect (or any effect to be honest!).
I guess this is a result of trying to guess the model being used in the CSS.
A suggestion for the Papyrus CSS help file would be to provide a link to the meta model (s?) used to support the CSS syntax. Also, if it is possible to force the public properties of blocks to be visible, show this as an additional example (since I guess other projects have similar presentation requirements to our project).

Moving to Papyrus from commercial tools I was a little sceptical of the abilities but apart from minor issues such as this I have found Papyrus to be an excellent tool. Many thanks to the development team.
Re: Help requested on CSS [message #1443802 is a reply to message #1436224] Mon, 13 October 2014 08:23 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 920
Registered: February 2011
Senior Member
Hi Philip,

This use case is currently not supported, but should be in Eclipse Mars (June 2015). The CSS rules can only be applied to elements which are already present in the notation model (i.e. displayed in the diagram, or hidden but still present in the diagram). By default, compartment contents don't exist at all in the diagram; so, CSS can't help.

The plan for Mars is to provide an optional synchronization mechanism, which can be enabled/disabled via a CSS rule. Consequently, it would be possible to force-display the contents of a compartment.

Thanks for the feedback!
Regards,
Camille


Camille Letavernier
Re: Help requested on CSS [message #1695921 is a reply to message #1443802] Wed, 20 May 2015 10:50 Go to previous messageGo to next message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Hi

We are using the awesome .css features extensively in our efforts. With the new canonical property we can decide that certain diagrams should show more detail than others.

Thanks!

However, we could not find a way to "filter" the Attribute compartment to show only attributes and not association roles (both being UML Properties if I understand it right). Is this possible with either .css or the Synchronized with Model menu alternative?

Patrik
Re: Help requested on CSS [message #1695927 is a reply to message #1695921] Wed, 20 May 2015 11:07 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 920
Registered: February 2011
Senior Member
Hi Patrik,


The synchronization mechanism should be used to "display everything", then you can add a CSS filter rule to hide properties related to an association:

Class Property[association] {
    visible: false;
}


[association] corresponds to Property#association in the UML Metamodel. If you don't specify a value, this means "non-null value", so this will match all properties which are related to an Association (i.e. all properties which are "member ends" of any association)


Regards,
Camille


Camille Letavernier
Re: Help requested on CSS [message #1695934 is a reply to message #1695927] Wed, 20 May 2015 11:47 Go to previous messageGo to next message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Thanks for your quick response.

Now I get Papyrus to hide all my associations that have a name.

However, I would also want to hide (the association ends for) my associations that does not have a name.

How can I do this?

Patrik
Re: Help requested on CSS [message #1695953 is a reply to message #1695934] Wed, 20 May 2015 14:09 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 920
Registered: February 2011
Senior Member
Hi,

Indeed, unnamed references are handled in the same way than null references. That's a bug in Papyrus.

I've reported Bug 467716 and it should be fixed soon

467716: [CSS] Unnamed references and null references can't be distinguished
https://bugs.eclipse.org/bugs/show_bug.cgi?id=467716

Regards,
Camille


Camille Letavernier
Re: Help requested on CSS [message #1696028 is a reply to message #1695953] Thu, 21 May 2015 09:14 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 920
Registered: February 2011
Senior Member
Hi,

Bug 467716 is fixed, you can try again with the latest nightly build for Mars

Regards,
Camille


Camille Letavernier
Re: Help requested on CSS [message #1696126 is a reply to message #1696028] Fri, 22 May 2015 08:52 Go to previous message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Wow!

That was a quick fix.
Impressive.

Thanks

Patrik
Previous Topic:How to automatically show border items such as ports of a part
Next Topic:Export Diagrams from without eclipse
Goto Forum:
  


Current Time: Fri Feb 28 16:50:56 GMT 2020

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

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

Back to the top