1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.db.layer0.util;
\r
14 import java.util.Collection;
\r
16 import org.simantics.databoard.container.DataContainer;
\r
17 import org.simantics.db.Resource;
\r
18 import org.simantics.db.layer0.internal.SimanticsInternal;
\r
19 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;
\r
20 import org.simantics.db.layer0.variable.Variable;
\r
21 import org.simantics.graph.representation.TransferableGraph1;
\r
22 import org.simantics.utils.datastructures.hints.IHintContext.Key;
\r
23 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
\r
26 * For dealing with clipboard-related keys listed in this class, see the
\r
27 * utility methods listed as <code>see</code> in this class.
\r
29 * @see SimanticsInternal#getClipboard()
\r
30 * @see SimanticsClipboard#getContents()
\r
31 * @see ClipboardUtils#accept(java.util.Set, Key)
\r
32 * @see ClipboardUtils#accept(org.simantics.db.ReadGraph, java.util.Set, Key)
\r
34 public interface SimanticsKeys {
\r
37 * A key for storing the resource of the current project in an IHintContext.
\r
38 * This is used with ISessionContext.
\r
40 Key KEY_PROJECT = new KeyOf(Resource.class, "PROJECT_RESOURCE");
\r
43 * A key for storing the cut/copied transferable graph in a
\r
44 * {@link SimanticsClipboard} instance as an available
\r
45 * {@link Representation} for the clipboard data.
\r
47 Key KEY_TRANSFERABLE_GRAPH = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH");
\r
50 * A key for storing the cut/copied transferable graph source in a
\r
51 * {@link SimanticsClipboard} instance as an available
\r
52 * {@link Representation} for the clipboard data.
\r
54 Key KEY_TRANSFERABLE_GRAPH_SOURCE = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH_SOURCE");
\r
57 * A key for storing the cut/copied DataContainer in a
\r
58 * {@link SimanticsClipboard} instance as an available
\r
59 * {@link Representation} for the clipboard data.
\r
61 Key KEY_DATA_CONTAINER = new KeyOf(DataContainer.class, "DATA_CONTAINER");
\r
64 * A key for storing the original source {@link Resource} of a copy
\r
65 * operation in a {@link SimanticsClipboard} instance as an available
\r
66 * {@link Representation} for the clipboard data.
\r
68 Key KEY_COPY_RESOURCES = new KeyOf(Collection.class, "COPY_RESOURCE");
\r
71 * A key for storing the original source {@link Resource} of a cut operation
\r
72 * in a {@link SimanticsClipboard} instance as an available
\r
73 * {@link Representation} for the clipboard data.
\r
75 Key KEY_CUT_RESOURCES = new KeyOf(Collection.class, "CUT_RESOURCE");
\r
78 * A key for storing the original copied {@link Variable} in a
\r
79 * {@link SimanticsClipboard} instance as an available
\r
80 * {@link Representation} for the clipboard data.
\r
82 Key KEY_VARIABLE = new KeyOf(Variable.class, "VARIABLE");
\r