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.selectionview;
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;
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}
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.
33 * @author Tuukka Lehtonen
35 * @see ComparableTabContributor
37 public interface PropertyTabContributor {
40 * Creates and initializes a property tab (see {@link IPropertyTab}).
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)}
51 * @return the created property tab control
53 IPropertyTab create(Composite parent, IWorkbenchSite site, ISessionContext context, Object input);