Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 52bf711c20b65fd47b5a5b345d0565d5d424c821 (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
/*******************************************************************************
 * Copyright (c) 2012 THALES GLOBAL SERVICES.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * 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);
    }

}

Back to the top