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.browsing.ui.common.internal;
\r
14 import java.util.Deque;
\r
15 import java.util.List;
\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
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
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
34 * @author Tuukka Lehtonen
\r
36 public interface IGraphExplorerContext extends IDisposable {
\r
39 int queryIndent(int offset);
\r
41 IGECache getCache();
\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
47 void update(UIElementReference ref);
\r
49 Object getPropagateLock();
\r
50 Object getPropagateListLock();
\r
52 void setPropagating(boolean b);
\r
53 boolean isPropagating();
\r
55 void setScheduleList(List<Runnable> list);
\r
56 List<Runnable> getScheduleList();
\r
58 Deque<Integer> getActivity();
\r
59 void setActivityInt(int i);
\r
60 int getActivityInt();
\r
62 void scheduleQueryUpdate(Runnable r);
\r