blob: 6cc2c05e516e1a5565e644aeb1bc5fb1e813ccbf (
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
|
/*******************************************************************************
* Copyright (c) 2012 THALES GLOBAL SERVICES.
* 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.internal.refresh;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.sirius.diagram.ui.internal.refresh.diagram.ViewPropertiesSynchronizer;
/**
* A {@link RecordingCommand} to execute
* {@link ViewPropertiesSynchronizer#synchronizeViewProperties(org.eclipse.gmf.runtime.notation.View)}
* on a specifed {@link View}.
*
* @author <a href="mailto:esteban.dugueperoux@obeo.fr">Esteban Dugueperoux</a>
*/
public class SynchronizeGMFViewPropertiesCommand extends RecordingCommand {
private View view;
/**
* Default constructor.
*
* @param domain
* the {@link TransactionalEditingDomain} on which execute this
* command
* @param view
* the {@link View} from which update properties according to
* DDiagramElement's style properties
*/
public SynchronizeGMFViewPropertiesCommand(TransactionalEditingDomain domain, View view) {
super(domain);
this.view = view;
}
@Override
protected void doExecute() {
new ViewPropertiesSynchronizer().synchronizeViewProperties(view);
}
}
|