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