Home » Modeling » Papyrus » CSS Canonical does not work in SysML
| |
Re: CSS Canonical does not work in SysML [message #1700364 is a reply to message #1700356] |
Thu, 02 July 2015 07:45 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Liem,
Quote:+ however, right then, I modify canonical = false => the ports will not disappears. That means, once the properties are showed, they can not be unshowed by setting canonica = false
That's intentional: the synchronization mechanism automatically displays everything (Populates the diagram), but it doesn't need to be active at all time. If the elements are not synchronized, then the mechanism simply does nothing. It doesn't keep track of elements that have been automatically synchronized, vs the ones that have been manually displayed.
Undoing canonical = true works, however.
Regards,
Camille
Camille Letavernier
|
|
|
Re: CSS Canonical does not work in SysML [message #1700414 is a reply to message #1700354] |
Thu, 02 July 2015 13:02 |
|
Hi, Thanh Liem,
The canonical edit policy does not purport to remove views when it is
disabled. It only removes views for elements that should no longer be
shown as child nodes or connected edges because the structure of the
model has changed.
If the SysML IBD has some missing canonical behaviour, then perhaps it
needs to register some canonical strategies to make that work. Please
raise a bug on the SysML component.
Cheers,
Christian
On 2015-07-02 07:05:21 +0000, Thanh Liem Phan said:
> Hi, I've tested the canonical function of CSS with UML and SysML. Here
> are my observations:
> - UML : + canonical = true => all ports (of a certain part in a
> composite diagram) appears
> + however, right then, I modify canonical = false => the ports will
> not disappears. That means, once the properties are showed, they can
> not be unshowed by setting canonica = false
>
> - SysML : canonical does not function in IBD
>
> Could anyone show me how to get this done in SysML?
> Thanks for your help.
>
> Thanh Liem.
|
|
|
Re: CSS Canonical does not work in SysML [message #1700416 is a reply to message #1700356] |
Thu, 02 July 2015 13:06 |
|
Hi,
The Papyrus mechanism for customization of drag-and-drop on the
diagrams is the "drop strategies" extension point:
org.eclipse.papyrus.infra.gmfdiag.dnd.dropStrategy. By replacing the
Papyrus drop edit policy via the GMF extension point, you have removed
the mechanism that the canonical edit-policy relies on for creation of
new diagram views.
So, try implementing your custom drop behaviour using a drop strategy
instead and see whether that restores the canonical presentation.
HTH,
Christian
On 2015-07-02 07:09:08 +0000, Thanh Liem Phan said:
> I've also noticed that, if I register a new DropEditPolicyProvider
> (with a new DropEditPolicy) via extension
> org.eclipse.gmf.runtime.diagram.ui.editPolicyProvides in Papyrus, the
> canonical function with not run even with UML diagrams.
|
|
|
Re: CSS Canonical does not work in SysML [message #1700833 is a reply to message #1700416] |
Tue, 07 July 2015 13:36 |
Thanh Liem Phan Messages: 28 Registered: January 2015 |
Junior Member |
|
|
Thanks Christian,
The fact that I need to set myDragDropStrategy as a drag&drop default strategy also. So if I don't replace the default DropEditPolicyProvider by a new one, I couldn't achieve this requirement, and each time user drag&drop a component from the lib, Papyrus will display a list of strategy to choose.
And it's redundant action for the end user.
Do you have any idea?
Thanks for your help.
[Updated on: Tue, 07 July 2015 13:40] Report message to a moderator
|
|
|
Re: CSS Canonical does not work in SysML [message #1700837 is a reply to message #1700833] |
Tue, 07 July 2015 13:50 |
|
Right, probably best to set your drop strategy as a default to
encourage consistent behaviour for your users.
I know of no definitive means by which you can avoid the drop
strategies contributed by plug-ins. There may be a Preference Page in
which you can selectively disable drop strategies. If there isn't,
there should be one (please raise a bugzilla in this case).
Cheers,
Christian
|
|
| |
Re: CSS Canonical does not work in SysML [message #1700999 is a reply to message #1700906] |
Wed, 08 July 2015 14:47 |
|
Hi, Thanh Liem,
What do you mean by "set the canonical strategies for SysML"? It's up
to the SysML diagrams to define strategies (if required) for canonical
synchronization. This isn't intended for user extensibility.
Cheers,
Christian
On 2015-07-08 06:50:42 +0000, Thanh Liem Phan said:
> Thanks Christian, I will try with the Preference Page solution in order
> to set the default drag&drop strategie.
> By the way, if it's not so complicated, could you show me how to set
> the canonical strategies for SysML?
> Thanks and best regards.
> Thanh Liem.
|
|
| | |
Re: CSS Canonical does not work in SysML [message #1701118 is a reply to message #1701068] |
Thu, 09 July 2015 13:01 |
|
Hi, PTL,
That is a bug. Would you mind raising it in bugzilla?
https://bugs.eclipse.org/bugs/enter_bug.cgi?form_name=enter_bug&product=Papyrus&version=1.1.0
Thanks!
Christian
On 2015-07-09 07:46:37 +0000, Thanh Liem Phan said:
> Hi Christian,
>
> When I register a new D&D strategy (disable the registration of the new
> EditPolicyProviders), the popup menu is like the following :
>
>
> There are two dnd strategies in this case:
> - the new one I've just created "Drop the component from the Spider Library"
> - and "Selection drop action for"
>
> But in fact, "Selection drop action for" is not listed in the
> Preferences\Papyrus\Drag&Drop. This is a default DnD strategy, which is
> created "on the fly" in the class DropEditPolicy, which is then
> instantiated by DropEditPolicyProvider.
>
> That means, evens I deselect all d&d strategies but my own one (cf the
> figure below), the popup menu is always displayed when user drag&drop a
> component from model lib.
>
>
> Do you have any idea?
>
> Thanks and have a nice day.
> PTL.
>
> <image>
> <image>
|
|
|
Goto Forum:
Current Time: Thu Sep 26 18:57:23 GMT 2024
Powered by FUDForum. Page generated in 0.04177 seconds
|