Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 662e9f84c028e44c86b347f29d91929b1c4d935b (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
/*****************************************************************************
 * Copyright (c) 2014 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:
 *  Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation
 *
 *****************************************************************************/

package org.eclipse.papyrus.infra.nattable.handler;

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;


public class MergeTableHandler extends AbstractTableHandler {

	/**
	 *
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
	 *
	 * @param event
	 * @return
	 * @throws ExecutionException
	 */
	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {

		// the complete merge of the table is not supported yet
		// TODO rewrite/fix the spanning behavior when applied to both columns and rows (cells hidden under others)

		// if(mergeOption.equals("Merge Table")) {
		// System.out.println(mergeOption);
		// resetSpan();
		// bodyLayerStack.getBodyLayerSpanProvider().setAutoColumnSpan(true);
		// bodyLayerStack.getBodyLayerSpanProvider().setAutoRowSpan(true);
		//
		// Integer[] testListColumn = { new Integer(11), new Integer(12), new Integer(13), new Integer(14) };
		// Integer[] testListRow = { new Integer(0), new Integer(1), new Integer(2), new Integer(3), new Integer(4), new Integer(5) };
		// bodyLayerStack.getBodyLayerSpanProvider().addAutoSpanningRowPositions(testListRow);
		// bodyLayerStack.getBodyLayerSpanProvider().addAutoSpanningColumnPositions(testListColumn);
		//
		// refreshTable();
		// }

		return null;
	}

}

Back to the top