1
/*******************************************************************************
2
* Copyright (c) 2007, 2008 Intel Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Intel Corporation - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.ui.newui;
13
import org.eclipse.swt.widgets.Composite;
16
* Interface for tabs in new CDT model.
17
* All tabs available via extension point
18
* "org.eclipse.cdt.managedbuilder.ui.cPropertyTab"
19
* should implement this interface.
21
public interface ICPropertyTab {
23
// kinds of message to be sent (and appropriate data class)
24
public static final int OK = 0; // perform OK (null)
25
public static final int APPLY = 1; // apply changes (IResourceDescription)
26
public static final int CANCEL = 2; // cancel changes (null)
27
public static final int DEFAULTS = 3; // set defaults (null)
28
public static final int UPDATE = 4; // re-read cfg (IConfiguration)
29
public static final int VISIBLE = 5; // set visible (not-null means true)
30
public static final int DISPOSE = 6; // dispose (null)
31
public static final int SET_ICON = 7; // inform tab about its icon (Image)
33
public static final int MAXCOMMON = 100; // values below are common
34
// values above are private
35
// Informs other tabs about changes in managed build settings.
36
// It may result in hiding/showing some tabs or changing their
37
// contents. Data field is not used (null).
38
public static final int MANAGEDBUILDSTATE = MAXCOMMON + 1;
41
* Creation of all visible elements
42
* @param parent - composite where widgets should be created
43
* @param provider - underlying page
45
public void createControls(Composite parent, ICPropertyProvider provider);
48
* Handle events sent by another tabs or pages
49
* Most of them are processed in <link>AbstractCPropertyTab</link>
50
* but this functionality can be overridden partially or fully.
51
* @param kind - message ID (see <link>AbstractCPropertyTab</link>)
52
* @param data - additional info, depanding of message kind.
54
public void handleTabEvent (int kind, Object data);
57
* Returns true (by default) if page's contents is correct
58
* Returns false if page cannot be shown because it does
59
* not fit to other settings (for example, managed build
60
* settings are not possible when managed build is off).
62
public boolean canBeVisible();
64
//*********************************
65
// TODO: in next version, add :
66
//*********************************
68
* @return Help Context Id
70
// public String getHelpContextId();
72
* set Help Context Id for the tab
74
// public void setHelpContextId(String id);