]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/internal/IGraphExplorerContext.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.browsing.ui.common / src / org / simantics / browsing / ui / common / internal / IGraphExplorerContext.java
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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.browsing.ui.common.internal;\r
13 \r
14 import java.util.Deque;\r
15 import java.util.List;\r
16 \r
17 import org.simantics.browsing.ui.DataSource;\r
18 import org.simantics.browsing.ui.GraphExplorer;\r
19 import org.simantics.browsing.ui.NodeQueryProcessor;\r
20 import org.simantics.browsing.ui.PrimitiveQueryProcessor;\r
21 import org.simantics.utils.datastructures.disposable.IDisposable;\r
22 \r
23 /**\r
24  * An internal interface for supporting the implementation of\r
25  * {@link GraphExplorer}. Contains methods for the interaction of GraphExplorer\r
26  * and {@link GENodeQueryManager}, and {@link UpdateRunner}.\r
27  * \r
28  * <p>\r
29  * The main purpose of this context class is to support switching of explorer\r
30  * inputs in a proper way which disposes all the {@link GENodeQueryManager}'s\r
31  * and any resource queries possibly hidden behind them.\r
32  * </p>\r
33  * \r
34  * @author Tuukka Lehtonen\r
35  */\r
36 public interface IGraphExplorerContext extends IDisposable {\r
37 \r
38     int queryIndent();\r
39     int queryIndent(int offset);\r
40 \r
41     IGECache getCache();\r
42 \r
43     <T> NodeQueryProcessor<T> getProcessor(Object o);\r
44     <T> PrimitiveQueryProcessor<T> getPrimitiveProcessor(Object o);\r
45     <T> DataSource<T> getDataSource(Class<T> clazz);\r
46 \r
47     void update(UIElementReference ref);\r
48 \r
49     Object getPropagateLock();\r
50     Object getPropagateListLock();\r
51 \r
52     void setPropagating(boolean b);\r
53     boolean isPropagating();\r
54 \r
55     void setScheduleList(List<Runnable> list);\r
56     List<Runnable> getScheduleList();\r
57 \r
58     Deque<Integer> getActivity();\r
59     void setActivityInt(int i);\r
60     int getActivityInt();\r
61 \r
62     void scheduleQueryUpdate(Runnable r);\r
63 \r
64 }\r