~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ICPropertyTab.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
7
 *
 
8
 * Contributors:
 
9
 *     Intel Corporation - initial API and implementation
 
10
 *******************************************************************************/
 
11
package org.eclipse.cdt.ui.newui;
 
12
 
 
13
import org.eclipse.swt.widgets.Composite;
 
14
 
 
15
/**
 
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.
 
20
 */
 
21
public interface ICPropertyTab {
 
22
 
 
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)    
 
32
        
 
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; 
 
39
 
 
40
        /**
 
41
         * Creation of all visible elements
 
42
         * @param parent   - composite where widgets should be created
 
43
         * @param provider - underlying page 
 
44
         */
 
45
        public void createControls(Composite parent, ICPropertyProvider provider);
 
46
        
 
47
        /**
 
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.
 
53
         */
 
54
        public void handleTabEvent (int kind, Object data);
 
55
        
 
56
        /**
 
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).
 
61
         */
 
62
        public boolean canBeVisible();
 
63
        
 
64
        //*********************************
 
65
        // TODO: in next version, add :
 
66
        //*********************************
 
67
        /**
 
68
         * @return Help Context Id
 
69
         */
 
70
        // public String getHelpContextId();
 
71
        /**
 
72
         * set Help Context Id for the tab
 
73
         */
 
74
        // public void setHelpContextId(String id);
 
75
}