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