org.eclipse.cdt.ui.newui
Class AbstractPrefPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.preference.PreferencePage
          extended by org.eclipse.ui.dialogs.PropertyPage
              extended by org.eclipse.cdt.ui.newui.AbstractPage
                  extended by org.eclipse.cdt.ui.newui.AbstractPrefPage
All Implemented Interfaces:
ICOptionContainer, ICPropertyProvider, org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.preference.IPreferencePage, org.eclipse.jface.preference.IPreferencePageContainer, org.eclipse.ui.IWorkbenchPreferencePage, org.eclipse.ui.IWorkbenchPropertyPage
Direct Known Subclasses:
PrefPage_Abstract, PrefPage_NewCDTProject, PrefPage_NewCDTWizard, PrefPage_PropertyPage

public abstract class AbstractPrefPage
extends AbstractPage
implements org.eclipse.ui.IWorkbenchPreferencePage

Abstract page to be used as base for preference pages


Field Summary
 org.eclipse.swt.widgets.Label titleLabel
           
 
Fields inherited from class org.eclipse.cdt.ui.newui.AbstractPage
CLASS_NAME, ELEMENT_NAME, EMPTY_STR, IMAGE_NAME, PARENT_NAME, TEXT_NAME, TIP_NAME, WEIGHT_NAME
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
AbstractPrefPage()
           
 
Method Summary
 org.eclipse.cdt.core.settings.model.ICResourceDescription getResDesc()
           
 void init(org.eclipse.ui.IWorkbench workbench)
           
 boolean isForPrefs()
           
 void performApply()
           
 boolean performOk()
          There are 2 ways to perform OK for CDT property pages. 1st (default): All pages use the same editable copy of ICProjectDescription.
 
Methods inherited from class org.eclipse.cdt.ui.newui.AbstractPage
createWidgets, dispose, enableConfigSelection, getCfgsEditable, getCfgsReadOnly, getElement, getMultiCfg, getPreferences, getPreferenceStore, getProject, getResDesc, getWeight, handleMessage, informAll, informPages, isApplicable, isCDTPrj, isCDTProject, isForFile, isForFolder, isForProject, isMultiCfg, isValid, performCancel, performDefaults, setVisible, updateButtons, updateContainer, updateMessage, updateTitle, updateViews
 
Methods inherited from class org.eclipse.ui.dialogs.PropertyPage
setElement
 
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, computeSize, createControl, getContainer, okToLeave, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
getControl, getDescription, getErrorMessage, getImage, getMessage, getMessageType, getShell, getTitle, setDescription, setImageDescriptor, setMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.preference.IPreferencePage
computeSize, isValid, okToLeave, performCancel, setContainer, setSize
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPropertyPage
setElement
 

Field Detail

titleLabel

public org.eclipse.swt.widgets.Label titleLabel
Constructor Detail

AbstractPrefPage

public AbstractPrefPage()
Method Detail

isForPrefs

public boolean isForPrefs()
Specified by:
isForPrefs in interface ICPropertyProvider
Overrides:
isForPrefs in class AbstractPage

init

public void init(org.eclipse.ui.IWorkbench workbench)
Specified by:
init in interface org.eclipse.ui.IWorkbenchPreferencePage

getResDesc

public org.eclipse.cdt.core.settings.model.ICResourceDescription getResDesc()
Specified by:
getResDesc in interface ICPropertyProvider
Overrides:
getResDesc in class AbstractPage

performApply

public void performApply()
Overrides:
performApply in class AbstractPage

performOk

public boolean performOk()
Description copied from class: AbstractPage
There are 2 ways to perform OK for CDT property pages. 1st (default): All pages use the same editable copy of ICProjectDescription. When OK occurs, this object is simply set. 2nd: When OK occurs, each page must copy its data to new instance of ICProjectDescription, like it occurs during Apply event. It allows to avoid collisions with other property pages, which do not share ICProjectDescription instance. But some changes may be saved wrong if they are affected by data from another property pages (Discovery options etc). To enable 2nd mode, just create the following file: /.metadata/.plugins/org.eclipse.cdt.ui/apply_mode

Specified by:
performOk in interface org.eclipse.jface.preference.IPreferencePage
Overrides:
performOk in class AbstractPage