]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.selectionview/src/org/simantics/selectionview/PropertyTabContributor.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.selectionview / src / org / simantics / selectionview / PropertyTabContributor.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.selectionview;
13
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.ui.IWorkbenchSite;
16 import org.eclipse.ui.part.IPageSite;
17 import org.eclipse.ui.part.PageBook;
18 import org.simantics.db.management.ISessionContext;
19 import org.simantics.selectionview.ComparableTabContributor;
20 import org.simantics.selectionview.SelectionProcessor;
21
22 /**
23  * A {@link PropertyTabContributor} is used to encapsulate initialization of the
24  * controls of a single tab control within a tabbed property page.
25  * PropertyTabContributors are created internally by {@link SelectionProcessor}
26  * implementations.
27  * 
28  * <p>
29  * {@link ComparableTabContributor} is used for ordering a set of
30  * {@link PropertyTabContributor}s according to their designated priority. This
31  * is necessary to make the tabbed UI presentation order deterministic.
32  * 
33  * @author Tuukka Lehtonen
34  * 
35  * @see ComparableTabContributor
36  */
37 public interface PropertyTabContributor {
38
39     /**
40      * Creates and initializes a property tab (see {@link IPropertyTab}).
41      * 
42      * @param parent the parent composite for the property tab to create
43      * @param site site of the {@link PageBook} page this TabbedPropertyTable
44      *        contributes to (see {@link IPageSite})
45      * @param context the current database session context
46      * @param input processed input provided internally by
47      *        {@link SelectionProcessor} implementations. Do not pass this on,
48      *        to get input for property tab, wait for invocations to
49      *        {@link IPropertyTab#setInput(ISessionContext, org.eclipse.jface.viewers.ISelection, boolean)}
50      *        instead
51      * @return the created property tab control
52      */
53     IPropertyTab create(Composite parent, IWorkbenchSite site, ISessionContext context, Object input);
54
55 }