Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d2339da52712b8874657e57a1453dd648d9c6992 (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) 2013 CEA LIST.
 *
 *
 * 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:
 *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.common.handlers;

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration;

/**
 * The handler used to create a nattable editor without the name dialog
 *
 * @author Vincent Lorenzo
 *
 */
public class CreateNatTableEditorWithoutDialogHandler extends CreateNatTableEditorHandler {



	/**
	 *
	 * Constructor.
	 *
	 */
	public CreateNatTableEditorWithoutDialogHandler() {
		super();
	}


	/**
	 * Run the command as a transaction. Create a Transaction and delegate the
	 * command to {@link #doExecute(ServicesRegistry)}.
	 *
	 * @throws ServiceException
	 *
	 */
	@Override
	public void runAsTransaction(final ExecutionEvent event) throws ServiceException {
		// we create a new resourceSet to avoid to load unused config in the resourceset in case of Cancel
		TableConfiguration conf = getTableEditorConfiguration();
		String defaultName = conf.getName();
		runAsTransaction(event, defaultName);
	}




}

Back to the top