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.browsing.ui.common.internal;
14 import java.util.Deque;
15 import java.util.List;
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;
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}.
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.
34 * @author Tuukka Lehtonen
36 public interface IGraphExplorerContext extends IDisposable {
39 int queryIndent(int offset);
43 <T> NodeQueryProcessor<T> getProcessor(Object o);
44 <T> PrimitiveQueryProcessor<T> getPrimitiveProcessor(Object o);
45 <T> DataSource<T> getDataSource(Class<T> clazz);
47 void update(UIElementReference ref);
49 Object getPropagateLock();
50 Object getPropagateListLock();
52 void setPropagating(boolean b);
53 boolean isPropagating();
55 void setScheduleList(List<Runnable> list);
56 List<Runnable> getScheduleList();
58 Deque<Integer> getActivity();
59 void setActivityInt(int i);
62 void scheduleQueryUpdate(Runnable r);