blob: ee6ef7d1b1ce73e67fcdd8f0188af61be8ad2ccb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*******************************************************************************
* Copyright (c) 2010, 2015 THALES GLOBAL SERVICES and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.diagram.ui.tools.internal.commands;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramEdgeEditPart;
import org.eclipse.sirius.diagram.ui.provider.Messages;
/**
* Specific command to update the routing style of an edge edit part.
*
* @author mporhel
*/
public final class EdgeRoutingStyleChangedCommand extends RecordingCommand {
private final IDiagramEdgeEditPart editpart;
private final Notification msg;
/**
* Constructor.
*
* @param domain
* the editing domain.
* @param msg
* the notification
* @param editpart
* the edge edit part to update.
*/
public EdgeRoutingStyleChangedCommand(TransactionalEditingDomain domain, IDiagramEdgeEditPart editpart, Notification msg) {
super(domain, Messages.EdgeRoutingStyleChangedCommand_label);
this.editpart = editpart;
this.msg = msg;
}
/**
* {@inheritDoc}
*/
@Override
protected void doExecute() {
if (editpart == null || msg == null) {
return;
}
editpart.routingStyleChanged(msg);
}
}
|