de.cau.cs.kieler.ksbase.ui.preferences
Class EditorsPreferencePage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.preference.PreferencePage
          extended by de.cau.cs.kieler.ksbase.ui.preferences.EditorsPreferencePage
All Implemented Interfaces:
IDialogPage, IMessageProvider, IPreferencePage, IWorkbenchPreferencePage

public class EditorsPreferencePage
extends PreferencePage
implements IWorkbenchPreferencePage

The KSBasE transformation preference page. The preference page is used to modify existing extensions only! Due to technical restrictions, it is not possible to add new settings here. If you'd like to create features for a new editor please use the 'ksbase.configuration' extension point provided by this project

Rating red

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
EditorsPreferencePage()
          Default constructor.
 
Method Summary
protected  Control createContents(Composite parent)
          Creates the contents of the preference page.
protected static EditorTransformationSettings getActiveEditor()
          Gets the active editor.
 void init(IWorkbench workbench)
          Initializes the preference page.
protected  void performApply()
           
 boolean performOk()
          Performs an 'OK' command.
protected static void setActiveEditor(EditorTransformationSettings editor)
          Sets the new active editor.
 
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performCancel, performDefaults, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
 

Constructor Detail

EditorsPreferencePage

public EditorsPreferencePage()
Default constructor. Sets the preference page title.

Method Detail

createContents

protected Control createContents(Composite parent)
Creates the contents of the preference page.

Specified by:
createContents in class PreferencePage
Parameters:
parent - The parent of this preference page.
Returns:
The created controls.

init

public final void init(IWorkbench workbench)
Initializes the preference page.

Specified by:
init in interface IWorkbenchPreferencePage
Parameters:
workbench - The workbench for this preference page

performApply

protected void performApply()
Overrides:
performApply in class PreferencePage

performOk

public boolean performOk()
Performs an 'OK' command. i.e. stores the settings for the currently selected editor.

Specified by:
performOk in interface IPreferencePage
Overrides:
performOk in class PreferencePage
Returns:
False if an error occurred while storing the settings.

getActiveEditor

protected static EditorTransformationSettings getActiveEditor()
Gets the active editor. Called by the TransformationPreferencePage

Returns:
The active editor, may return null if no editor available or selected

setActiveEditor

protected static void setActiveEditor(EditorTransformationSettings editor)
Sets the new active editor. The new editor ''may be null'' this is used for some checks, so the missing null-check is intended.

Parameters:
editor - The new editor