1 /*******************************************************************************
2 * Copyright (c) 2012 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.diagram.handler;
16 import org.simantics.db.RequestProcessor;
17 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;
18 import org.simantics.utils.datastructures.hints.IHintContext.Key;
19 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
22 * @author Tuukka Lehtonen
24 public class DiagramSelectionRepresentation implements Representation {
27 * A key for describing a DiagramSelection representation for the Simantics
30 public static final Key KEY_DIAGRAM_SELECTION = new KeyOf(DiagramSelection.class);
32 private DiagramSelection selection;
34 public DiagramSelectionRepresentation(DiagramSelection selection) {
35 this.selection = selection;
40 return KEY_DIAGRAM_SELECTION;
43 @SuppressWarnings("unchecked")
45 public <T> T getValue(RequestProcessor processor, Map<String,Object> hints) {