|
|
Re: Show/hide edge via notational model [message #725329 is a reply to message #725315] |
Wed, 14 September 2011 14:14 |
|
I think if you modify directly the Notation model, you'll need to
refresh your editpart to get it read again the notation model and alter
the figure (visible=false) according to it.
Here is some stuff that sounds good for your use case
* ShowHideRelationshipsRequest
* RequestConstants.REQ_SHOWHIDE_RELATIONSHIPS
In case it does not work, you can mimic the mechanism to hide labels
* HideConnectionLabelsAction
* ToggleConnectionLabelsRequest
* RequestConstants.REQ_TOGGLE_CONNECTION_LABELS
On 14/09/2011 15:54, J.Teutsch wrote:
> Hi Ralph,
>
> I have the problem a little bit different. Connection with notation
> visible=false are not shown.
>
> But you have to make same visible or invisible before the ShapeImpl
>
> // make only edges visible
> for (View edgeView : recursiveFieldInExpressLinks)
> {
> if (edgeView instanceof EdgeImpl)
> {
> SetRequest request = new SetRequest((EObject) edgeView,
> NotationPackage.eINSTANCE.getView_Visible(), visibilize);
>
> SetValueCommand cmd = new SetValueCommand(request);
> linkCommand.add(cmd);
> }
> }
>
> My problem is, when I save a diagram with invisible EdgeImpl and reopen
> it, the Edges are not shown anymore. Maybe you can share your code
>
> Kind regards J. Teutsch
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02553 seconds