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.diagram.synchronization;
\r
14 import org.simantics.g2d.diagram.IDiagram;
\r
15 import org.simantics.g2d.element.IElement;
\r
16 import org.simantics.g2d.element.IElementClassProvider;
\r
17 import org.simantics.project.IProject;
\r
18 import org.simantics.project.ProjectKeys;
\r
19 import org.simantics.utils.datastructures.hints.IHintContext;
\r
20 import org.simantics.utils.datastructures.hints.IHintContext.Key;
\r
21 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
\r
24 * A collection of {@link IHintContext} keys related to graph and diagram
\r
27 * @author Tuukka Lehtonen
\r
29 public final class SynchronizationHints {
\r
32 * A key for associating an {@link ISynchronizationContext} with an
\r
35 public static final Key CONTEXT = new KeyOf(ISynchronizationContext.class, "SYNCHRONIZATION_CONTEXT");
\r
38 * A key for associating an {@link IElementClassProvider} with an
\r
39 * {@link ISynchronizationContext}.
\r
41 public static final Key ELEMENT_CLASS_PROVIDER = new KeyOf(IElementClassProvider.class, "ELEMENT_CLASS_PROVIDER");
\r
44 * A key for associating an {@link ErrorHandler} with an
\r
45 * {@link ISynchronizationContext}.
\r
47 public static final Key ERROR_HANDLER = new KeyOf(ErrorHandler.class, "ERROR_HANDLER");
\r
50 * A key for associating an {@link IModificationQueue} with an
\r
51 * {@link ISynchronizationContext}.
\r
53 public static final Key MODIFICATION_QUEUE = new KeyOf(IModificationQueue.class, "MODIFICATION_QUEUE");
\r
56 * A key for associating a custom hint synchronizer to an {@link IElement}.
\r
58 public static final Key HINT_SYNCHRONIZER = new KeyOf(IHintSynchronizer.class, "HINT_SYNCHRONIZER");
\r
61 * A key for defining a {@link CopyAdvisor} to be used with a particular
\r
64 public static final Key COPY_ADVISOR = new KeyOf(CopyAdvisor.class, "COPY_ADVISOR");
\r
67 * A key for hinting to a {@link CopyAdvisor} that it should not perform
\r
68 * renaming of the copied data.
\r
70 public static final Key NO_RENAME = new KeyOf(Boolean.class, "NO_RENAME");
\r
73 * A key for retrieving the curretly active project (see {@link IProject})
\r
74 * from an {@link ISynchronizationContext}.
\r
76 public static final Key PROJECT = ProjectKeys.KEY_PROJECT;
\r